<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Usersinfo extends Model
{
    protected $table = 'users_info';
    protected $primaryKey = 'id';

    public static function getUsersInfoDetial($users_id)
    {
        return self::where("users_id",$users_id)->first();
    }

    public static function updateUsersInfo($users_id,$email,$wechat,$remark,$comefrom)
    {
        return self::where("users_id",$users_id)->update(["email"=>$email,"wechat"=>$wechat,"remark"=>$remark,"comefrom"=>$comefrom]);
    }

    public static function createUsersInfo($users_id,$email,$wechat,$remark,$comefrom)
    {
        return self::insert(["users_id"=>$users_id,"email"=>$email,"wechat"=>$wechat,"remark"=>$remark,"comefrom"=>$comefrom]);
    }

    public static function batchCreateUsersInfo($usersLists)
    {
        return self::insert($usersLists);
    }
}
